package Lee_code;

import java.util.ArrayDeque;
import java.util.Deque;
import java.util.HashSet;

public class Lee_200_wfs {
    int row, column;
    int count=0;

    public int numIslands(char[][] grid) {
        row = grid.length;
        column = grid[0].length;

        for(int i=0; i<row; i++)
        {
            for(int j=0; j<column; j++)
            {
                if(grid[i][j]=='1')
                {
                    count++;
                    Deque<Character> deque = new ArrayDeque<>();
                    deque.offer(grid[i][j]);

                    while (!deque.isEmpty())
                    {
                        char now = deque.poll();


                    }

                }
            }
        }


        return count;

    }

}
